package com.example.servicehi.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Author: Robin
 * @Date: 2019/4/28 上午11:42
 * @Description: TODO
 */
@RestController
public class controller {

    @Resource
    private FeignExampleService feignExampleService;

    @Value("${server.port}")
    String port;
    @RequestMapping(value = "/hi",method = RequestMethod.GET)
    public String home(@RequestParam String name) {
        return "hi "+name+",i am from port:" + port;
    }



    @GetMapping("/hello/{name}")
    public String index(@PathVariable("name") String name) {
        return feignExampleService.hello(name);
    }
}
